<script setup>
  defineProps({
    textArr: Array,
    default:""
  })
</script>

<template>
  <div class="content" >
    <div class="head">
      <span :style="`--i:${index}`" v-for="(text,index) in textArr" :key="index">{{text}}</span>
    </div>
    <slot></slot>
  </div>
</template>

<style scoped lang="scss">
.content {
  width: 1000px;
  height: 150px;
  position: absolute;
  top: 30%;
  left: 50%;
  margin-left: -500px;
  z-index: 5;
  transform-origin: center center;
  -webkit-transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;

  .head {
    font-size: 60px;
    letter-spacing: 3px;
    cursor: default;
    animation: siz 2s ease-in-out forwards;

    span {
      animation: animate 4s ease-in-out infinite;
      animation-delay: calc(0.1s * var(--i));
      display: inline-block;
    }
  }
}
</style>